DevForce Help Reference
IsPendingEntityList Property
Example 


Returns true if the current list is pending the completion of an asynchronous navigation.
Syntax
'Declaration
 
Public ReadOnly Property IsPendingEntityList As Boolean
'Usage
 
Dim instance As RelatedEntityList(Of T)
Dim value As Boolean
 
value = instance.IsPendingEntityList
public bool IsPendingEntityList {get;}
Example
private Customer _aCustomer;

public void GetCustOrdersAsync() {

  DomainModelEntityManager mgr = = new DomainModelEntityManager();

  // Turn on async navigation.  This is a readonly property in Silverlight.
  mgr.UseAsyncNavigation = true;

  // Assume we already have a Customer instance. 
  // Navigate to customer orders.  
  // If UseAsyncNavigation is true and the orders aren't already in cache
  // the IsPendingEntityList flag will be on.

  var orders = _aCustomer.OrderSummaries;
  Assert.IsTrue(orders.IsPendingEntityList);

  // Setup a handler to be called when data is returned.
 orders.PendingEntityListResolved += PendingOrdersResolvedHandler;
}

private void PendingOrdersResolvedHandler(object sender, PendingEntityListResolvedEventArgs<OrderSummary> args) {
  // The original RelatedEntityList will now contain the returned entities, as will the 
  // args.ResolvedEntities list.

  Assert.IsFalse(_customer.OrderSummaries.IsPendingEntityList);
  Assert.IsTrue(_customer.OrderSummaries.Count > 0);
}
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

RelatedEntityList<T> Class
RelatedEntityList<T> Members

Send Feedback